package com.redis.service.impl;

import com.redis.dao.CommonRedisDao;
import com.redis.service.CommonRedisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by junli on 2018/1/11.
 */
@Service("commonRedisServiceImpl")
public class CommonRedisServiceImpl implements CommonRedisService {

    private CommonRedisDao redisDao;

    @Autowired
    public CommonRedisServiceImpl(CommonRedisDao redisDao) {
        this.redisDao = redisDao;
    }

    @Override
    public boolean cacheStringValue(String key, String value) {
        return redisDao.cacheStringValue(key, value);
    }

    @Override
    public String getStringValue(String key) {
        return redisDao.getStringValue(key);
    }
}
